<div class="am-u-sm-12 widget" style="margin:10px ;">
	<div class="am-u-sm-12">
		<form class="am-form-inline tpl-form-border-form" action="" method="get">
			<div class="am-form-group am-u-sm-3">
				<select name="car_type_id" data-am-selected="{btnWidth:'100%', btnSize: 'sm',}">
					<option value=" ">全部车型</option>
					{$car_type_ids}
				</select>
			</div>

			<div class="am-form-group am-u-sm-3">
				<input type="text" class="am-form-field" name="number" placeholder="请输入车牌号" value="{$Think.get.number}">
			</div>
			<div class="am-form-group am-u-sm-3">
				<input type="text" class="am-form-field" name="name" placeholder="请输入公司名" value="{$Think.get.name}">
			</div>
			<div class="am-form-group am-u-sm-3">
				<button type="submit" class="am-btn am-btn-sm am-btn-primary am-radius" style="margin-top: -2px;">查询</button> 
				{if $op == 'search'||$op == 'unbind'||$op == 'bind'} {else/}
				<a href="{:url('add')}" class="am-btn am-btn-sm am-btn-primary am-radius" style="margin-top: -2px;">添加车辆</a>
				{/if}
			</div>

		</form>
	</div>
	<div style="padding: 10px;" class="am-u-sm-12">
		<div><button style="float: right;" type="button" class="am-btn am-btn-default am-radius am-btn-xs" style="margin-top: -2px;">导出文件</button></div>
		<table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black am-text-nowrap">
			<thead>
				<tr>
					
					{if $op == 'search'||$op == 'unbind'||$op == 'bind'}
					<th>操作</th>
					{else/} {/if}
					<th>车牌号</th>
					<th>品牌</th>
					<th>车型</th>
					<th>所属公司</th>
					<th>注册时间</th>
					<th>状态</th>
					{if $op == 'search'||$op == 'unbind'||$op == 'bind'} {else/}
					<th>操作</th>
					{/if}
				</tr>
			</thead>
			<tbody>
				{foreach $list as $key => $item}
				<tr data-id="{$item.car_id}">
					{if $op == 'bind'}
					<td>
						<div class="tpl-table-black-operation">
							<a href="javascript:;" class="bind" data-id="{$item.car_id}" >
								<i class="am-icon-pencil"></i> 关联
							</a>
						</div>
					</td>
					{else/} {/if}
					{if $op == 'unbind'}
					<td>
						<div class="tpl-table-black-operation">
							<a href="javascript:;" class="unbind" data-id="{$item.car_id}">
								<i class="am-icon-pencil"></i> 关联解除
							</a>
						</div>
					</td>
					{else/} {/if}
					{if $op == 'search'}
					<td>
						<div class="tpl-table-black-operation">
							<a href="javascript:;" class="choose" data-id="{$item.car_id}" data-number="{$item.number}">
								<i class="am-icon-pencil"></i> 选中
							</a>
						</div>
					</td>
					{else/} {/if}
					<td>
						<a href="{:url('detail',['car_id'=>$item['car_id'] ])}">{$item.number}</a>
					</td>
					<td>{$car_brands[$item.car_brand_id]}{$car_models[$item.car_model_id]}{$car_series[$item.car_series_id]}</td>
					<td>{$car_types[$item.car_type_id]}</td>
					<td>{$item.car_rental_name}</td>
					<td>{$item.register_time}</td>
					<td class="am-text-{$item.state==9?'danger':'success'}">{$item.state==9?'已禁用':'已启用'}</td>
					{if $op == 'search'||$op == 'unbind'||$op == 'bind'} {else/}
					<td>
						<div class="tpl-table-black-operation">
							 {if $item.state == 9}
							<a href="javascript:;" class="startusing" data-method="startusing">
								<i class="am-icon-pencil"></i> 启用
							</a>
							{else/}
							<a href="javascript:;" class="tpl-table-black-operation-del forbidden" data-method="forbidden">
								<i class="am-icon-trash"></i> 禁用
							</a>
							{/if}
							<a href="{:url('edit',['car_id'=>$item.car_id])}">
								<i class="am-icon-pencil"></i> 编辑
							</a>
							<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
								<i class="am-icon-trash"></i> 删除
							</a>
							<a class="showTrack" data-method="showmap" data-location="">
								<i class="am-icon-map"></i> 轨迹
							</a>
							

						</div>
					</td>
					{/if}
				</tr>
				{/foreach}
				<!-- more data -->
			</tbody>

		</table>
		<div class="am-u-lg-12 am-cf">

			<div class="am-fr">
				{$pager}
			</div>
		</div>
	</div>

</div>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.2&key={:config('base.mapkey')}&plugin=AMap.Driving"></script>
<script src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>